﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

namespace DuToanT2.Models.Mapping
{
    public class UserMap : EntityTypeConfiguration<UserProfile>
    {
        public UserMap()
        { 
            // key
            HasKey(t => t.ID);

            // properties
            Property(t => t.ID);
            Property(t => t.RealName);
            Property(t => t.PhoneNumber);
            Property(t => t.UserName);
            Property(t => t.IsWorking);
            Property(t => t.Description);
            Property(t => t.LastLogin);

            // table
            ToTable("UserProfile");

        }
    }
}
